package com.applet.message.domain.vo;

import com.applet.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


@Getter
public class MessageVo {
    /** 主键 */
    @ApiModelProperty(value = "主键",dataType = "Long")
    private Long id;

    /** 接收消息的用户id */
    @ApiModelProperty(value = "接收消息的用户id",dataType = "Long")
    @Excel(name = "接收消息的用户id")
    private Long receiveUserId;

    /**
     * 用户账号
     */
    @ApiModelProperty(value = "接收消息账号",dataType = "Long")
    @Excel(name = "接收消息账号")
    private String userName;

    /** 消息内容 */
    @ApiModelProperty(value = "消息内容",dataType = "String")
    @Excel(name = "消息内容")
    private String messageContent;

    /** 消息是否已读: 0未读 1已读 */
    @ApiModelProperty(value = "消息是否已读(0未读 1已读)",dataType = "Integer")
    @Excel(name = "消息是否已读: 0未读 1已读")
    private Integer status;

    /** 消息发送者 */
    @ApiModelProperty(value = "消息发送者",dataType = "String")
    @Excel(name = "消息发送者")
    private String sender;
    @ApiModelProperty(value = "创建时间",dataType = "Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;


    @ApiModelProperty(value = "更新时间",dataType = "Date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public void setReceiveUserId(Long receiveUserId)
    {
        this.receiveUserId = receiveUserId;
    }

    public void setMessageContent(String messageContent)
    {
        this.messageContent = messageContent;
    }

    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public void setSender(String sender)
    {
        this.sender = sender;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("receiveUserId", getReceiveUserId())
                .append("messageContent", getMessageContent())
                .append("status", getStatus())
                .append("userName", getUserName())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("sender", getSender())
                .toString();
    }
}
